<?php 
$vtime="";
if(isset($_REQUEST['type'])){
	if($_REQUEST['type']=="thang"){
		$ntt=date("t",mktime(0,0,0,$_REQUEST['mon'],1,$_REQUEST['year']));
		if($_REQUEST['mon']<10){
			$vtime=$_REQUEST['year']."-0".$_REQUEST['mon']."-01"." ~ ".$_REQUEST['year']."-0".$_REQUEST['mon']."-".$ntt;
		}else{
			$vtime=$_REQUEST['year']."-".$_REQUEST['mon']."-01"." ~ ".$_REQUEST['year']."-".$_REQUEST['mon']."-".$ntt;
		}
	}else if($_REQUEST['type']=="tinhqui"){
		$mangquy=array(1,1,1,2,2,2,3,3,3,4,4,4);
		$mq=array(1=>array(1,3),2=>array(4,6),3=>array(7,9),4=>array(10,12));
		$ntt=date("t",mktime(0,0,0,$mq[$_REQUEST['qui']][1],1,$_REQUEST['year']));
		if($mq[$_REQUEST['qui']][0]<10){
			$vtime=$_REQUEST['year']."-0".$mq[$_REQUEST['qui']][0]."-01"." ~ ".$_REQUEST['year']."-0".$mq[$_REQUEST['qui']][1]."-".$ntt;
		}else{
			$vtime=$_REQUEST['year']."-".$mq[$_REQUEST['qui']][0]."-01"." ~ ".$_REQUEST['year']."-".$mq[$_REQUEST['qui']][1]."-".$ntt;
		}
	}
}
?>
<input type="text" id="vttime" name="vttime" value="<?=$vtime?>" style="border:none;background:none;width:200px;font-size:12px;font-weight:bold;" readonly="readonly"/>
